import Cookies from 'js-cookie'

const TokenKey = 'PC-Token'
const TokenPrefix = 'Bearer '

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, TokenPrefix + token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}
export function setName(name) {
    return Cookies.set('userName', name)
}
export function getName() {
    return Cookies.get('userName')
}
export function setAvatar(avatar) {
    return Cookies.set('avatar',avatar)
}
export function getAvatar() {
    return Cookies.get('avatar')
}
export function setOrgId(orgId) {
    return Cookies.set('orgId',orgId)
}
export function getOrgId() {
    return Cookies.get('orgId')
}
export function setOperatedLiveRoomId(operatedLiveRoomId) {
    return Cookies.set('operatedLiveRoomId',operatedLiveRoomId)
}
export function getOperatedLiveRoomId() {
    return Cookies.get('operatedLiveRoomId')
}

